// #ifndef _TINYXML2_H_
#include"./tinyxml2-master/tinyxml2.h"
// #endif
// #include"./tinyxml2-master/tinyxml2.cpp"
#include<iostream>
#include<vector>

using namespace std;

void xmlCreate(){
    const char* declaration ="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>";
    tinyxml2::XMLDocument doc;
    doc.Parse(declaration);//会覆盖xml所有内容

	// 创建根元素<sld>
	tinyxml2::XMLElement* root1 = doc.NewElement( "p:sld" );
    
    root1->SetAttribute( "xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main" ); 
    root1->SetAttribute( "xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships" ); 
    root1->SetAttribute( "xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main" ); 
	doc.InsertEndChild( root1 );

    // 创建子元素<p:cSld>
	tinyxml2::XMLElement* cSld1 = doc.NewElement( "p:cSld" );
	root1->InsertEndChild( cSld1 );

    // 创建子元素<p:spTree>
	tinyxml2::XMLElement* spTree1 = doc.NewElement( "p:spTree" );
	cSld1->InsertEndChild( spTree1 );
    doc.SaveFile( "1.xml" );
    cout << "########################xml create successfully########################" << endl;
}
